package com.controller.common;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by  qdf on 2019/3/20.
 */

@Controller
public class CommonController {

    /*@RequestMapping("/{link}/{link1}/{link2}")
    public String getPage(@PathVariable String link,@PathVariable String link1,@PathVariable String link2){
      return  link+"/"+link1+"/"+link2;
    }*/

    @RequestMapping("/{link}")
    public String link(@PathVariable String link){
      return  link;
    }

    @RequestMapping("/link")
    public String getPage( String url){
        return  url.replace(".jsp","");
    }
}
